import Vue from 'vue'
import App from './App.vue'

Vue.config.productionTip = false


import Home from './views/Home.vue'
import News from './views/News.vue'
import Sports from './views/Sports.vue'
import MySports from './views/Sports/MySports.vue'
import SportsHome from './views/Sports/SportsHome.vue'
import SportsNews from './views/Sports/SportsNews.vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)
const routes = [
    { path: '/', redirect: '/home' },
    { path: '/home', component: Home },
    { path: '/news', component: News },
    {
        path: '/sports',
        component: Sports,
        children: [
            { path: 'MySports', component: MySports },
            { path: 'SportsHome', component: SportsHome },
            { path: 'SportsNews', component: SportsNews },
        ]
    },
]
const router = new VueRouter({ routes, mode: 'history' })

new Vue({
    render: h => h(App),
    router
}).$mount('#app')